# -*- coding: utf-8 -*-
import multiprocessing
import time


def task():
    for i in range(10):
        print(f'任务 {i} 执行中....')
        time.sleep(0.2)


if __name__ == '__main__':
    sub_process = multiprocessing.Process(target=task)
    sub_process.start()

    time.sleep(0.5)
    print('主进程执行完毕')
